#include<bits/stdc++.h>
using namespace std;

int main() {
	double ret = 0;
	int n;
	cin >> n;
	double x = 0, y = 0;
	double xx, yy;
	for(int i = 1; i <= n; i ++ ) {
		cin >> xx >> yy;
		ret += sqrt(pow(xx - x, 2.0) + pow(yy - y, 2.0));
		x = xx;
		y = yy;
	}
	ret += sqrt(pow(xx, 2) + pow(yy, 2));
	printf("%.10lf\n", ret);
	return 0;
}

